//
//  postImageFile.m
//  购房通
//
//  Created by URANUS on 15/8/3.
//  Copyright (c) 2015年 URANUS. All rights reserved.
//

#import "postImageFile.h"
//#import "AFHTTPRequestOperationManager.h"
//#import "CommFunc.h"

@implementation postImageFile

-(void)postImageFile:(UIImage *)image withAddress:(NSString *)address withRequest:(NSDictionary *)request withKey:(NSString *)key andHandleResposeBlock:(HandleResponseBlock) handleResponseBlock{

//    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
//    manager.responseSerializer = [AFHTTPResponseSerializer serializer];
//    
//    [manager POST:address parameters:request constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
//        //appendPartWithFileData:UIImageJPEGRepresentation(image, 1.0)将image转化为jpeg，压缩率为1.0表示为不压缩
//        [formData appendPartWithFileData:UIImageJPEGRepresentation(image, 1.0) name:key fileName:key mimeType:@"image/jpeg"];
//    } success:^(AFHTTPRequestOperation *operation, id responseObject) {
//        NSString *responseString = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
//        handleResponseBlock(responseString);
//
//    } failure:^(AFHTTPRequestOperation *operation, NSError *error){
//        NSLog(@"%@", error);
//        
//    }];

}


@end
